package com.dfbz.demo02_枚举的使用;

import org.junit.Test;

/**
 * @author lscl
 * @version 1.0
 * @intro:
 */
public class Demo01_枚举与switch {


    @Test
    public void test()throws Exception{

        method();
    }


    public void method(){

        // 枚举实例
        Season season = Season.WINTER;

        switch (season){
            case SPRING:
                System.out.println("春天~");
                break;
            case SUMMER:
                System.out.println("夏天！");
                break;
            case AUTUMN:
                System.out.println("秋天@");
                break;
            case WINTER:
                System.out.println("冬天&");
                break;
            default:
                System.out.println("错误的季节");
        }

    }
}
